package com.yuantong.xyerp.core.api.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yuantong.xyerp.core.api.model.Role;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="UserDto对象", description="用户表")
public class UserDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "真实姓名")
    @Excel(name = "员工姓名",width = 40)
    private String realName;

    @ApiModelProperty(value = "组织机构id")
    private String organizationId;

    @ApiModelProperty(value = "角色id")
    private String roleId;

    @ApiModelProperty(value = "登录账号（只能为数字）")
    @Excel(name = "登录账号")
    private String loginName;

    @ApiModelProperty(value = "密码要求8-20位")
    private String password;

    @ApiModelProperty(value = "联系电话")
    @Excel(name = "联系电话",width = 40)
    private String mobile;

    @ApiModelProperty(value = "男1, 女0")
    @Excel(name = "性别",replace = { "男_1", "女_0" })
    private String gender;

    @ApiModelProperty(value = "职务")
    @Excel(name = "职务",width = 40)
    private String position;

    @ApiModelProperty(value = "职级")
    @Excel(name = "职级",width = 40)
    private String rank;

    @ApiModelProperty(value = "入职时间")
    @Excel(name = "入职时间",format = "yyyy-MM-dd",width = 40.0)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date entryDate;

    @ApiModelProperty(value = "身份证号码")
    @Excel(name = "身份证号码",width = 60)
    private String sfzNo;

    @ApiModelProperty(value = "民族")
    @Excel(name = "民族")
    private String nation;

    @ApiModelProperty(value = "0-未婚；1-已婚；2-离异；3-再婚；4-丧偶")
    @Excel(name = "婚姻状况",replace = { "未婚_0", "已婚_1","离异_2","再婚_3","丧偶_4" })
    private String marriage;

    @ApiModelProperty(value = "学历")
    @Excel(name = "学历")
    private String education;

    @ApiModelProperty(value = "紧急联系人")
    @Excel(name = "紧急联系人",width = 40)
    private String emergencyContact;

    @ApiModelProperty(value = "紧急联系电话")
    @Excel(name = "紧急联系电话",width = 40)
    private String emergencyMobile;

    @ApiModelProperty(value = "户籍所在地")
    @Excel(name = "户籍所在地",width = 40)
    private String householdRegister;

    @ApiModelProperty(value = "家庭地址")
    @Excel(name = "家庭地址",width = 40)
    private String address;

    @ApiModelProperty(value = "最后一次用户数据修改时间（保存到秒）")
    @Excel(name = "员工数据最后一次修改时间",format = "yyyy-MM-dd HH:mm:ss",width = 40)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间",format = "yyyy-MM-dd HH:mm:ss",width = 40)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "0-停用；1-启用")
    @Excel(name = "员工状态",replace = {"启用_1", "停用_0"})
    private String status;

    @ApiModelProperty(value = "0-删除；1-启用")
    private String deleteStatus;




    @ApiModelProperty(value = "部门名称")
    @Excel(name = "所在部门名称",width = 40)
    private String organizationName;

    @ApiModelProperty(value = "角色名称")
    @Excel(name = "角色名称",width = 40)
    private String roleName;

}
